*{ #{extends 'Commodities/frame.html'/} }*

#{form @Commodities.update()}
	
	#{ifErrors}
        <p class="error">
            Please correct these errors.
        </p>
    #{/ifErrors}
    
    <fieldset>
    <p>
        #{field 'commodity.name'}
        <label>商品名称:</label>
        <input type="text" name="${field.name}" 
            value="${commodity?.name}" class="${field.errorClass}" />
        #{/field}
    </p>
    <p>
        #{field 'commodity.SN'}
        <label>商品编号:</label>
        <input type="text" name="${field.name}" 
            value="${commodity?.SN}" class="${field.errorClass}" />
        #{/field}
    </p>
    <p>
        #{field 'commodity.manufacturerSN'}
        <label>厂家编号:</label>
        <input type="text" name="${field.name}" 
            value="${commodity?.manufacturerSN}" class="${field.errorClass}" />
        #{/field}
    </p>
    </fieldset>
    
    <p>
        #{field 'commodity.unit'}
        <label>商品单位:</label>
        <input type="text" name="${field.name}" 
            value="${commodity?.unit}" class="${field.errorClass}" />
        #{/field}
    </p>
    <p>
        #{field 'commodity.size'}
        <label>商品尺寸:</label>
        <input type="text" name="${field.name}" 
            value="${commodity?.size}" class="${field.errorClass}" />
        #{/field}
    </p>
    <p>
        #{field 'commodity.material'}
        <label>商品材质:</label>
        <input type="text" name="${field.name}" 
            value="${commodity?.material}" class="${field.errorClass}" />
        #{/field}
    </p>
    <p>
        #{field 'commodity.placeOfOrigin'}
        <label>商品产地:</label>
        <input type="text" name="${field.name}" 
            value="${commodity?.placeOfOrigin}" class="${field.errorClass}" />
        #{/field}
    </p>
    
    <fieldset>
    <p>
        #{field 'commodity.packaging'}
        <label>商品包装:</label>
        <input type="text" name="${field.name}" 
            value="${commodity?.packaging}" class="${field.errorClass}" />
        #{/field}
    </p>
    <p>
        #{field 'commodity.numberPerBox'}
        <label>装箱数量:</label>
        <input type="text" name="${field.name}" 
            value="${commodity?.numberPerBox}" class="${field.errorClass}" />
        #{/field}
    </p>
    </fieldset>
    
    <fieldset>
    <p>
        #{field 'commodity.weight'}
        <label>商品重量:</label>
        <input type="text" name="${field.name}" 
            value="${commodity?.weight}" class="${field.errorClass}" />
        #{/field}
    </p>
    <p>
        #{field 'commodity.grossWeight'}
        <label>商品毛重:</label>
        <input type="text" name="${field.name}" 
            value="${commodity?.grossWeight}" class="${field.errorClass}" />
        #{/field}
    </p>
    <p>
        #{field 'commodity.netWeight'}
        <label>商品净重:</label>
        <input type="text" name="${field.name}" 
            value="${commodity?.netWeight}" class="${field.errorClass}" />
        #{/field}
    </p>
    </fieldset>
    
    <p>
        #{field 'commodity.description'}
        <label>商品描述:</label>
        <textarea name="${field.name}" class="${field.errorClass}">${commodity?.description}</textarea>
        #{/field}
    </p>    
    <p>
    	<input type="submit" value="保存商品" />
    </p>
#{/form}